cmake_minimum_required(VERSION 2.8)


set (CMAKE_CXX_STANDARD 11)
option(WITH_SERVER "Option description" ON)

project (music_follower_audioServerDemo)

file(GLOB_RECURSE music_follower_audioServerDemo_SOURCES "./*.cpp" "./*.c")
file(GLOB_RECURSE music_follower_audioServerDemo_HEADERS "./*.h" "./*.hpp")

set (music_follower_audioServerDemo_INCLUDE_DIRS "")
foreach (_headerFile ${music_follower_audioServerDemo_HEADERS})
    get_filename_component(_dir ${_headerFile} PATH)
    list (APPEND music_follower_audioServerDemo_INCLUDE_DIRS ${_dir})
endforeach()
list(REMOVE_DUPLICATES music_follower_audioServerDemo_INCLUDE_DIRS)

include_directories(${music_follower_audioServerDemo_INCLUDE_DIRS})



if(WITH_SERVER)
  add_definitions(-DaudioServer)
  add_executable (music_follower_audioServerDemo ${music_follower_audioServerDemo_SOURCES})
else()
  add_definitions(-DaudioClient)
  add_executable (music_follower_audioClientDemo ${music_follower_audioServerDemo_SOURCES})
endif()

